<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<nav class="navbar navbar-inverse" role="navigation">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <a class="navbar-brand" href="index.jsp">
      	<span class="glyphicon glyphicon-home"></span>
      </a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
	        	<%
	        		String username = (String)session.getAttribute("username");
	        		String utype = (String)session.getAttribute("utype");
	        		if (username!=null&&utype.equals("person")) 
	        		{
	        	%>
			        <li><a href="#" id="scanNews">浏览新闻</a></li>
			        <!-- <li><a href="#">求职信息发布</a></li>
			        <li><a href="#">求职意向管理</a></li> -->
			        <li class="dropdown">
			          <a href="#" class="dropdown-toggle" data-toggle="dropdown">简历<span class="caret"></span></a>
			          <ul class="dropdown-menu" role="menu">
			            <li><a href="addCV.jsp">添加简历</a></li>
			            <li><a href="#" id="updateCV">更新简历</a></li>
			            <!-- <li><a href="#">Something else here</a></li> -->
			          </ul>
			        </li>
					<li><a href="#" id="scanHireInfo">招聘信息查询</a></li>
					<li><a href="addApply.jsp">提交简历申请表</a></li>
					<li>
						<form class="navbar-form navbar-left" role="newssearch" >
					        <div class="form-group">
					          <input type="text" class="form-control" name="newskeyword" id="newskeyword"placeholder="输入新闻关键字">
					        </div>
					        <a type="button" class="btn btn-success" id="newssearch">新闻搜索</a>
					      </form>
				    </li>
	        	<%
	        		}
	        		else
	        		{
	        	%>
	        			<li><a href="#">您无权限查看功能</a></li>
	        	<%
					}
	        	%>
	      </ul>

      <ul class="nav navbar-nav navbar-right">
	        <li>
	        	<%
	        		username = (String)session.getAttribute("username");
	        		if (username==null) 
	        		{

	        	%>
	        		<a data-toggle="modal" href="#loginModal">登录</a>
	
	        	<%
	        		}
	        		else
	        		{
	        	%>
	        		<a>欢迎您,<%=username%></a>
	        		</li>
	        		<li>
	        		<a href="#" id="logout">退出</a>
	        	<%
					}
	        	%>
	        </li>
	      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>